/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PrincipalDocenteView.java
 *
 * Created on 21-may-2012, 15:55:13
 */
package educar.gui;

import educar.controllers.PrincipalDocenteController;
import javax.swing.JButton;
import javax.swing.JFrame;

/**
 *
 * @author Flubber
 */
public class PrincipalDocenteView extends javax.swing.JFrame {

// <editor-fold defaultstate="collapsed" desc="Constructor">    
    /** Creates new form PrincipalView */
    public PrincipalDocenteView() {
        initComponents();
    }
// </editor-fold>
    
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jbActividad = new javax.swing.JButton();
        jbCalificar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);

        jbActividad.setText("Actividad");

        jbCalificar.setText("Calificar");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jbActividad, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jbCalificar, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(24, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jbCalificar, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbActividad, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(25, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

// <editor-fold defaultstate="collapsed" desc="Declaracion de Variables"> 
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jbActividad;
    private javax.swing.JButton jbCalificar;
    // End of variables declaration//GEN-END:variables
// </editor-fold>

    
    /**
     * Boton de Actividad
     * @return jbActividad
     */
    public JButton getJbActividad() {
        return jbActividad;
    }

    
    /**
     * Boton de Calificar
     * @return jbCalificar
     */
    public JButton getJbCalificar() {
        return jbCalificar;
    }
    
    
    /**
     * Ventana
     * @return PrincipalDocenteView
     */
    public JFrame getVentana(){
        return this;
    }
    
    
    /**
     * Asigna un Listener a los Botones
     * @param listener
     */
    public void setListenerButton(PrincipalDocenteController listener) {
        jbActividad.addActionListener(listener);
        jbCalificar.addActionListener(listener);
    }
    
    
    /**
     * Asigna un Listener a la Ventana
     * @param listener
     */
    public void setListenerWindow(PrincipalDocenteController listener){
        this.addWindowListener(listener);
    }
}
